import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: '/find'
  },
  // 底部导航路
  {
    path: '/find',
    name: 'Find',
    component: () => import('../views/tabbar/Find/find.vue'),
    meta:{
      showTab:true,
    }
  },
  // 播客
  {
    path: '/podcast',
    name: 'Podcast',
    component: () => import('../views/tabbar/Podcast/podcast.vue'),
    meta:{
      showTab:true,
    }
  },
  // 我的
  {
    path: '/my',
    name: 'my',
    component: () => import('../views/tabbar/My/my.vue'),
    meta:{
      showTab:true,
    }
  },
  // 关注
  {
    path: '/attention',
    name: 'Attention',
    component: () => import('../views/tabbar/Attention/attention.vue'),
    meta:{
      showTab:true,
    }
  },
  // 云村
  {
    path: '/cloud',
    name: 'Cloud',
    component: () => import('../views/tabbar/Cloud/cloud.vue'),
    meta:{
      showTab:true,
    }
  },


  // 歌单  // 歌单广场
  {
    path: '/square',
    component: () => import('../views/songlist/square/square.vue'),
  },
  // 歌单详情
  {
    path: '/songDetail/:songId',
    name: 'SongDetail',
    component: () => import('../views/songlist/SongDetail/songdetail.vue')
  },

  // 搜索
  {
    path: '/search',
    name: 'Search',
    component: () => import('../views/search/search.vue')
  },

  // 登录
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login/login.vue')
  },


]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router